package graphique;


import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JPanel;
import javax.swing.JSplitPane;


public class Repertoire extends JPanel{

	private JSplitPane split;
    private JSplitPane split2;
    private JSplitPane split3;
    private Fenetre f;
	
	public Repertoire (Fenetre feuille){
		super();
		f = feuille;
		
	}
	
	void repInit(){
		//On cr�e deux conteneurs de couleurs diff�rentes
		//JPanel panPrincipal = new JPanel();
		
		JPanel panListContact = new JPanel();
		Dimension preferredSize = new Dimension(f.getWidth(),f.getHeight());
		panListContact.setPreferredSize(preferredSize);
		//pan.setBackground(Color.blue);		
		JPanel panDetailContact = new JPanel();
		Dimension preferredSize2 = new Dimension(f.getWidth(),f.getHeight());
		panDetailContact.setPreferredSize(preferredSize2);
		//pan2.setBackground(Color.red);
		JPanel pan3 = new JPanel();
		//pan3.setBackground(Color.orange);
		JPanel pan4 = new JPanel();
		//pan4.setBackground(Color.YELLOW);
		
		this.add(panListContact);
		this.add(panDetailContact);
		//this.add(pan2);
		//this.add(pan4);
		
		
		
		//On construit enfin notre s�parateur
		split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panListContact, panDetailContact);
		//On place le s�parateur
		//split.setDividerLocation(80);
		/*split2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, pan3, pan2);
		//On place le s�parateur
		split2.setDividerLocation(100);
		//On passe les deux pr�c�dents JSplitPane � celui-ci
		split3 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, split, split2);
		//On place le s�parateur
		split3.setDividerLocation(80);*/
		
		//On le passe ensuite au contentPane de notre objet Fenetre
		//plac� au centre pour qu'il utilise tout l'espace disponible
		//getRootPane().
		add(split, BorderLayout.CENTER);
		setVisible(true);
	}
	
}
